//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { CustomerStatus, CustomerStatusResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooCustomerStatusList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<CustomerStatusResponse>(`/uctoo/customer_status/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooCustomerStatus = async (id: string) => {
  return requestClient.get<CustomerStatus>(`/uctoo/customer_status/${id}`);
};

export const adductooCustomerStatus = async (data: Partial<CustomerStatus>) => {
  return requestClient.post<CustomerStatus>('/uctoo/customer_status/add', data);
};

export const edituctooCustomerStatus = async (data: Partial<CustomerStatus>) => {
  return requestClient.post<CustomerStatus>('/uctoo/customer_status/edit', data);
};

export const deleteuctooCustomerStatus = async (id: string) => {
  return requestClient.post<any>('/uctoo/customer_status/del', { id });
};
